package com.bml.architect.consumer.service;

import com.bml.architect.DemoService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

//@EnableAutoConfiguration
public class TimeoutServiceConsumer {

        @Reference(version = "timeout",timeout = 3000,retries = 3)
        private DemoService demoService;

        public static void main(String[] args) {
            ConfigurableApplicationContext ca = SpringApplication.run(TimeoutServiceConsumer.class);

            DemoService demoServiec = ca.getBean(DemoService.class);
            System.out.println(demoServiec);
            System.out.println(demoServiec.sayHello("bml"));
    }
}
